<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-comment">-- | A tiny wrapper around 'IntSet.IntSet' for representing sets of 'Enum'</span><span>
</span><span id="line-2"></span><span class="hs-comment">-- things.</span><span>
</span><span id="line-3"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Data.EnumSet</span><span>
</span><span id="line-4"></span><span>    </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Data.EnumSet.html#EnumSet"><span class="hs-identifier">EnumSet</span></a></span><span>
</span><span id="line-5"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Data.EnumSet.html#member"><span class="hs-identifier">member</span></a></span><span>
</span><span id="line-6"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Data.EnumSet.html#insert"><span class="hs-identifier">insert</span></a></span><span>
</span><span id="line-7"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Data.EnumSet.html#delete"><span class="hs-identifier">delete</span></a></span><span>
</span><span id="line-8"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Data.EnumSet.html#toList"><span class="hs-identifier">toList</span></a></span><span>
</span><span id="line-9"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Data.EnumSet.html#fromList"><span class="hs-identifier">fromList</span></a></span><span>
</span><span id="line-10"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Data.EnumSet.html#empty"><span class="hs-identifier">empty</span></a></span><span>
</span><span id="line-11"></span><span>    </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-12"></span><span>
</span><span id="line-13"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-14"></span><span>
</span><span id="line-15"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../containers/src/Data.IntSet.html#"><span class="hs-identifier">Data.IntSet</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">IntSet</span></span><span>
</span><span id="line-16"></span><span>
</span><span id="line-17"></span><span class="hs-keyword">newtype</span><span> </span><span id="EnumSet"><span class="annot"><a href="GHC.Data.EnumSet.html#EnumSet"><span class="hs-identifier hs-var">EnumSet</span></a></span></span><span> </span><span id="local-6989586621680774442"><span class="annot"><a href="#local-6989586621680774442"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="EnumSet"><span class="annot"><a href="GHC.Data.EnumSet.html#EnumSet"><span class="hs-identifier hs-var">EnumSet</span></a></span></span><span> </span><span class="annot"><a href="../../containers/src/Data.IntSet.Internal.html#IntSet"><span class="hs-identifier hs-type">IntSet.IntSet</span></a></span><span>
</span><span id="line-18"></span><span>
</span><span id="line-19"></span><span id="local-6989586621680774450"><span class="annot"><a href="GHC.Data.EnumSet.html#member"><span class="hs-identifier hs-type">member</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Enum.html#Enum"><span class="hs-identifier hs-type">Enum</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680774450"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680774450"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Data.EnumSet.html#EnumSet"><span class="hs-identifier hs-type">EnumSet</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680774450"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span></span><span>
</span><span id="line-20"></span><span id="member"><span class="annot"><span class="annottext">member :: forall a. Enum a =&gt; a -&gt; EnumSet a -&gt; Bool
</span><a href="GHC.Data.EnumSet.html#member"><span class="hs-identifier hs-var hs-var">member</span></a></span></span><span> </span><span id="local-6989586621680774417"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680774417"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Data.EnumSet.html#EnumSet"><span class="hs-identifier hs-type">EnumSet</span></a></span><span> </span><span id="local-6989586621680774416"><span class="annot"><span class="annottext">IntSet
</span><a href="#local-6989586621680774416"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Key -&gt; IntSet -&gt; Bool
</span><a href="../../containers/src/Data.IntSet.Internal.html#member"><span class="hs-identifier hs-var">IntSet.member</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Key
forall a. Enum a =&gt; a -&gt; Key
</span><a href="../../base/src/GHC.Enum.html#fromEnum"><span class="hs-identifier hs-var">fromEnum</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680774417"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">IntSet
</span><a href="#local-6989586621680774416"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-21"></span><span>
</span><span id="line-22"></span><span id="local-6989586621680774444"><span class="annot"><a href="GHC.Data.EnumSet.html#insert"><span class="hs-identifier hs-type">insert</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Enum.html#Enum"><span class="hs-identifier hs-type">Enum</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680774444"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680774444"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Data.EnumSet.html#EnumSet"><span class="hs-identifier hs-type">EnumSet</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680774444"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Data.EnumSet.html#EnumSet"><span class="hs-identifier hs-type">EnumSet</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680774444"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-23"></span><span id="insert"><span class="annot"><span class="annottext">insert :: forall a. Enum a =&gt; a -&gt; EnumSet a -&gt; EnumSet a
</span><a href="GHC.Data.EnumSet.html#insert"><span class="hs-identifier hs-var hs-var">insert</span></a></span></span><span> </span><span id="local-6989586621680774411"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680774411"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Data.EnumSet.html#EnumSet"><span class="hs-identifier hs-type">EnumSet</span></a></span><span> </span><span id="local-6989586621680774410"><span class="annot"><span class="annottext">IntSet
</span><a href="#local-6989586621680774410"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IntSet -&gt; EnumSet a
forall a. IntSet -&gt; EnumSet a
</span><a href="GHC.Data.EnumSet.html#EnumSet"><span class="hs-identifier hs-var">EnumSet</span></a></span><span> </span><span class="annot"><span class="annottext">(IntSet -&gt; EnumSet a) -&gt; IntSet -&gt; EnumSet a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Key -&gt; IntSet -&gt; IntSet
</span><a href="../../containers/src/Data.IntSet.Internal.html#insert"><span class="hs-identifier hs-var">IntSet.insert</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Key
forall a. Enum a =&gt; a -&gt; Key
</span><a href="../../base/src/GHC.Enum.html#fromEnum"><span class="hs-identifier hs-var">fromEnum</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680774411"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">IntSet
</span><a href="#local-6989586621680774410"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-24"></span><span>
</span><span id="line-25"></span><span id="local-6989586621680774408"><span class="annot"><a href="GHC.Data.EnumSet.html#delete"><span class="hs-identifier hs-type">delete</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Enum.html#Enum"><span class="hs-identifier hs-type">Enum</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680774408"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680774408"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Data.EnumSet.html#EnumSet"><span class="hs-identifier hs-type">EnumSet</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680774408"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Data.EnumSet.html#EnumSet"><span class="hs-identifier hs-type">EnumSet</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680774408"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-26"></span><span id="delete"><span class="annot"><span class="annottext">delete :: forall a. Enum a =&gt; a -&gt; EnumSet a -&gt; EnumSet a
</span><a href="GHC.Data.EnumSet.html#delete"><span class="hs-identifier hs-var hs-var">delete</span></a></span></span><span> </span><span id="local-6989586621680774405"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680774405"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Data.EnumSet.html#EnumSet"><span class="hs-identifier hs-type">EnumSet</span></a></span><span> </span><span id="local-6989586621680774404"><span class="annot"><span class="annottext">IntSet
</span><a href="#local-6989586621680774404"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IntSet -&gt; EnumSet a
forall a. IntSet -&gt; EnumSet a
</span><a href="GHC.Data.EnumSet.html#EnumSet"><span class="hs-identifier hs-var">EnumSet</span></a></span><span> </span><span class="annot"><span class="annottext">(IntSet -&gt; EnumSet a) -&gt; IntSet -&gt; EnumSet a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Key -&gt; IntSet -&gt; IntSet
</span><a href="../../containers/src/Data.IntSet.Internal.html#delete"><span class="hs-identifier hs-var">IntSet.delete</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Key
forall a. Enum a =&gt; a -&gt; Key
</span><a href="../../base/src/GHC.Enum.html#fromEnum"><span class="hs-identifier hs-var">fromEnum</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680774405"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">IntSet
</span><a href="#local-6989586621680774404"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-27"></span><span>
</span><span id="line-28"></span><span id="local-6989586621680774437"><span class="annot"><a href="GHC.Data.EnumSet.html#toList"><span class="hs-identifier hs-type">toList</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Enum.html#Enum"><span class="hs-identifier hs-type">Enum</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680774437"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Data.EnumSet.html#EnumSet"><span class="hs-identifier hs-type">EnumSet</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680774437"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621680774437"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-29"></span><span id="toList"><span class="annot"><span class="annottext">toList :: forall a. Enum a =&gt; EnumSet a -&gt; [a]
</span><a href="GHC.Data.EnumSet.html#toList"><span class="hs-identifier hs-var hs-var">toList</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Data.EnumSet.html#EnumSet"><span class="hs-identifier hs-type">EnumSet</span></a></span><span> </span><span id="local-6989586621680774400"><span class="annot"><span class="annottext">IntSet
</span><a href="#local-6989586621680774400"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Key -&gt; a) -&gt; [Key] -&gt; [a]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Key -&gt; a
forall a. Enum a =&gt; Key -&gt; a
</span><a href="../../base/src/GHC.Enum.html#toEnum"><span class="hs-identifier hs-var">toEnum</span></a></span><span> </span><span class="annot"><span class="annottext">([Key] -&gt; [a]) -&gt; [Key] -&gt; [a]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">IntSet -&gt; [Key]
</span><a href="../../containers/src/Data.IntSet.Internal.html#toList"><span class="hs-identifier hs-var">IntSet.toList</span></a></span><span> </span><span class="annot"><span class="annottext">IntSet
</span><a href="#local-6989586621680774400"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-30"></span><span>
</span><span id="line-31"></span><span id="local-6989586621680774433"><span class="annot"><a href="GHC.Data.EnumSet.html#fromList"><span class="hs-identifier hs-type">fromList</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Enum.html#Enum"><span class="hs-identifier hs-type">Enum</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680774433"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621680774433"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Data.EnumSet.html#EnumSet"><span class="hs-identifier hs-type">EnumSet</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680774433"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-32"></span><span id="fromList"><span class="annot"><span class="annottext">fromList :: forall a. Enum a =&gt; [a] -&gt; EnumSet a
</span><a href="GHC.Data.EnumSet.html#fromList"><span class="hs-identifier hs-var hs-var">fromList</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IntSet -&gt; EnumSet a
forall a. IntSet -&gt; EnumSet a
</span><a href="GHC.Data.EnumSet.html#EnumSet"><span class="hs-identifier hs-var">EnumSet</span></a></span><span> </span><span class="annot"><span class="annottext">(IntSet -&gt; EnumSet a) -&gt; ([a] -&gt; IntSet) -&gt; [a] -&gt; EnumSet a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[Key] -&gt; IntSet
</span><a href="../../containers/src/Data.IntSet.Internal.html#fromList"><span class="hs-identifier hs-var">IntSet.fromList</span></a></span><span> </span><span class="annot"><span class="annottext">([Key] -&gt; IntSet) -&gt; ([a] -&gt; [Key]) -&gt; [a] -&gt; IntSet
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; Key) -&gt; [a] -&gt; [Key]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Key
forall a. Enum a =&gt; a -&gt; Key
</span><a href="../../base/src/GHC.Enum.html#fromEnum"><span class="hs-identifier hs-var">fromEnum</span></a></span><span>
</span><span id="line-33"></span><span>
</span><span id="line-34"></span><span id="local-6989586621680774428"><span class="annot"><a href="GHC.Data.EnumSet.html#empty"><span class="hs-identifier hs-type">empty</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Data.EnumSet.html#EnumSet"><span class="hs-identifier hs-type">EnumSet</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680774428"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-35"></span><span id="empty"><span class="annot"><span class="annottext">empty :: forall a. EnumSet a
</span><a href="GHC.Data.EnumSet.html#empty"><span class="hs-identifier hs-var hs-var">empty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IntSet -&gt; EnumSet a
forall a. IntSet -&gt; EnumSet a
</span><a href="GHC.Data.EnumSet.html#EnumSet"><span class="hs-identifier hs-var">EnumSet</span></a></span><span> </span><span class="annot"><span class="annottext">IntSet
</span><a href="../../containers/src/Data.IntSet.Internal.html#empty"><span class="hs-identifier hs-var">IntSet.empty</span></a></span><span>
</span><span id="line-36"></span></pre></body></html>